package com.qdlc.p2p.common.constant;

/**
 * 手续费支付方
 *
 * @author linya
 */
public enum AccountCashFeeBear {

    PLATFORM(1, "平台垫付"),
    PERSONAL(2, "个人支付");

    private int code;
    private String name;

    AccountCashFeeBear(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getName(int code) {
        for (AccountCashFeeBear entry : AccountCashFeeBear.values()) {
            if (entry.code == code) {
                return entry.name;
            }
        }
        return PERSONAL.name;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

}
